/*
 * Project: BoboDesignPattern
 * 
 * File Created at 2019年7月2日
 * 
 * Copyright 2012 Greenline.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Greenline Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Greenline.com.
 */
package test.lesson3.hashcode;

/**
 * @Type HashTable
 * @Desc
 * @author 52489
 * @date 2019年7月2日
 * @Version V1.0
 */
public class HashTable {

    private StuInfo[] data = new StuInfo[1000];

    /**
     * 向散列表中添加元素
     * 
     * @param stuInfo
     */
    public void put(StuInfo stuInfo) {
        int index = stuInfo.hashCode();
        data[index] = stuInfo;

    }

    public StuInfo get(StuInfo stuInfo) {

        return data[stuInfo.hashCode()];

    }
}
